<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>


    <div id="box">
        <!-- 给属性赋值的时候不能使用{{}}语法 -->
        <!-- <img src="{{url}}"> -->

        <!--v-bind 插值在属性里面 -->
        <img style="width: 100px;height: 100px;" v-bind:src="url">
        <a v-bind:href="aHref">百度一下</a>

        <!-- 语法糖写法  只需要加:-->
        <img style="width: 100px;height: 100px;" :src="url">
        <a :href="aHref">百度一下</a>
    </div>

</body>

<script src="https://cdn.bootcss.com/vue/2.6.11/vue.js"></script>
<script>
    new Vue({
        el: '#box',
        data: {
            url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1603885093387&di=730e08c25db879c15b0e203ab038ebff&imgtype=0&src=http%3A%2F%2Fattach.bbs.miui.com%2Fforum%2F201305%2F29%2F101838y2tkuxpfopkwzpvg.jpg',
            aHref: 'https://baidu.com',
        }

    })
</script>

</html>